home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************************************************************************
- *
- * ElementADT.h
- *
- * Public functions, structures and constants for the Element Abstract Data Type
- *
- * See the element ADT source for a theory of operation
- *
- *********************************************************************************************************************************/
-
- #ifndef __ELEMENTADT__
- #define __ELEMENTADT__
-
- #include "Structs.h"
-
- OSErr ElementError (void);
- ElementList CreateElementList (void);
- ElementReference CreateElement (ElementList list, ElementType elementType);
- void DestroyElementList (ElementList list);
- void DestroyElementRange (ElementReference beginElement, ElementReference endElementOrNIL);
- void DestroyElement (ElementReference element);
- short CountElements (ElementList list);
- unsigned long CountElementAllocations (void);
- ElementReference GetFirstElement (ElementList list);
- ElementReference GetLastElement (ElementList list);
- ElementReference GetNextElement (ElementReference element);
- ElementReference GetPreviousElement (ElementReference element);
-
- ElementList GetElementList (ElementReference element);
- ElementList GetSubElementList (ElementReference element);
-
- ElementList CloneElementList (ElementList list);
- ElementReference CloneElement (ElementReference element);
-
- void OrphanElement (ElementReference element);
- void OrphanElementRange (ElementReference beginElement, ElementReference endElementOrNIL);
- void AdoptOrphan (ElementList list, ElementReference element);
- void AdoptOrphanInsertingBeforeElement (ElementReference orphan, ElementReference element);
- void AdoptOrphanInsertingAfterElement (ElementReference orphan, ElementReference element);
- void FreeOrphanChain (ElementReference headOfChain);
-
-
-
- //
- // --- Accessors
- //
- ElementType GetElementType (ElementReference element);
- unsigned long GetElementNumber (ElementReference element);
- ElementList GetElementSubElementList (ElementReference element);
- Rect GetElementBoundingBox (ElementReference element);
-
- Point GetElementRoundRectOvalSize (ElementReference element);
-
- Point GetElementLineBeginPoint (ElementReference element);
- Point GetElementLineEndPoint (ElementReference element);
-
- PolyHandle GetElementPolygon (ElementReference element);
-
- RGBColor GetElementFillColor (ElementReference element);
- RGBColor GetElementStrokeColor (ElementReference element);
-
- short GetElementStrokePenWidth (ElementReference element);
- short GetElementStrokePenHeight (ElementReference element);
-
- //
- // --- Manipulators
- //
-
- void SetElementType (ElementReference element, ElementType elementType);
- void SetElementBoundingBox (ElementReference element, Rect boundingBox);
-
- void SetElementRoundRectOvalSize (ElementReference element, Point ovalSize);
-
- void SetElementLineBeginPoint (ElementReference element, Point p);
- void SetElementLineEndPoint (ElementReference element, Point p);
-
- void SetElementPolygon (ElementReference element, PolyHandle polygon);
-
- void SetElementStrokeColor (ElementReference element, RGBColor color);
- void SetElementFillColor (ElementReference element, RGBColor color);
-
- void SetElementStrokePenWidth (ElementReference element, short penWidth);
- void SetElementStrokePenHeight (ElementReference element, short penHeight);
-
- #endif
-